import 'ant-design-vue/dist/reset.css'
import '@/assets/styles/reset.css'
import '@/assets/styles/common.css'
import '@/assets/styles/ant-design-vue.less'
import 'virtual:uno.css'
import { createApp } from 'vue'
import { createPinia } from 'pinia'
import piniaPluginPersistence from 'pinia-plugin-persistedstate'
import permission from '@/directives/permission'
import Antd from 'ant-design-vue'

import App from './App'
import router from './router'

const pinia = createPinia()
pinia.use(piniaPluginPersistence)
const app = createApp(App)

app.use(router).use(Antd).use(pinia).directive('permission', permission).mount('#app')

app.config.errorHandler = (err) => {
  console.log('应用发生错误了', err)
}
